//@ sourceURL=signList.js
var tbSign = $('#signlist');

$(function() {
    tbSign.datagrid({
        url: nconSignList + '/getSign',
        fit: true,
        fitColumns: true,
        rownumbers: true,
        pagination: true,
        pageSize: 20,
        pageList: [20, 30, 40],
        pagerNumber: 1,
        singleSelect: true,
        columns: [
            [{
                field: 'id',
                title: 'ID',
                // checkbox:true,
                hidden: true
            }, {
                field: 'stuname',
                title: '姓名',
                width: 100
            }, {
                field: 'weixinid',
                title: '微信ID',
                width: 100
            }, {
                field: 'signintime',
                title: '签到',
                width: 100,
                formatter:function(value,rowData,rowIndex){
                    console.log(value);
                    return value?getTime(value):'';
                }
            }, {
                field:'signouttime',
                title:'签退',
                width:100,
                formatter:function(value,rowData,rowIndex){
                    return value?getTime(value):'';
                }
            }]
        ],
        toolbar: '#tbSign',
    });
});

sign = {
    search: function() {
        tbSign.datagrid('load', {
            username: $.trim($('#txtSignUserName').val())
        });
    },
    reset: function() {
        $('#txtSignUserName').val('');
        tbSign.datagrid('load', {});
    }
};


$(document).keydown(function(e) {
    if (e.keyCode == 13) {
        sign.search();
    }
});
